using System.Collections.Generic;
using WWB.DisqusSharp.Model.DisqusDTO;

namespace WWB.DisqusSharp.Model.DisqusService
{
    public interface IDisqusForumService
    {
        /// <summary>
        /// Get or create thread by identifier
        /// </summary>
        /// <param name="identifier">unique value (per forum) for a thread that is used to keep be able to get data even if permalink is changed.</param>
        /// <param name="title">if thread does not exist, the method will create it with the specified title (can be an empty string if you are sure that the thread exists)</param>
        /// <param name="category_id">if thread does not exist, the method will create it in the specified category</param>
        /// <param name="create_on_fail">should I craeate the thread on failure?</param>
        /// <returns>This method tries to find a thread by its identifier and title. If there is no such thread and create_on_fail  is undefined or set to 1, the method creates it. If create_on_fail  is set to 0, this method will return an empty (but valid) response.</returns>
        IDisqusServiceResult<DisqusThreadCreationResult> ThreadByIdentifier(string identifier, string title, string category_id, bool create_on_fail);

        /// <summary>
        ///  Get thread by URL
        /// </summary>
        /// <param name="url">url to find</param>
        /// <returns>Finds a thread by its URL. Output value is a thread object.</returns>
        IDisqusServiceResult<DisqusThread> ThreadByUrl(string url);

        /// <summary>
        /// Update thread
        /// </summary>
        /// <param name="threadId">Id of the thread to update.</param>
        /// <param name="args">Updated thread args</param>
        /// <returns>Updates thread with values described in the optional arguments above.</returns>
        IDisqusServiceResult<DisqusThread> UpdateThread(string threadId, UpdateThreadArgs args);

        /// <summary>
        /// Create a new post (i.e. add a new comment)
        /// </summary>
        /// <param name="args">Update arguments</param>
        /// <returns></returns>
        IDisqusServiceResult<CreatedPost> CreatePost(CreatePostArgs args);

        /// <summary>
        /// Delete a comment or mark it as spam (or not spam)
        /// </summary>
        /// <param name="post_id">post id</param>
        /// <param name="action">Name of action to be performed. Value can be spam, approve or kill.</param>
        /// <returns>Moderates post and returns modified version</returns>
        IDisqusServiceResult<CreatedPost> ModeratePost(string post_id, string action);

        
    }
}